# # # # # # # # # # # # # # # # # #
# Jormar Arellano
# Sabrina Fernandez
# # # # # # # # # # # # # # # # # #

CPP=g++
CC =gcc
PROGRAM_NAME = coloracion
CFLAGS += -Wall -O3
OBJECTS = graph.o population.o util.o arraylist.o LocalSearch.o ILS.o Grasp.o Igral.o Scatter.o Genetic.o
SOURCES = main.c

TEST_OBJECTS = ${OBJECTS} util_test.o
TEST_SOURCES = main_test.c

# Compilacion automatica para los archivos .o
%.o : %.c
	$(CC) $(CFLAGS) -c -o $@ $<

all: main

main: ${OBJECTS} ${SOURCES}
	$(CC) ${CFLAGS} -o $(PROGRAM_NAME) $?

test: ${TEST_OBJECTS} ${TEST_SOURCES}
	$(CC) ${CFLAGS} -o $(PROGRAM_NAME) $?

debug: ${OBJECTS} ${SOURCES}
	@echo "MODO DEBUG"
	$(CC) -DDEBUG=1 ${CFLAGS} -o $(PROGRAM_NAME) $?

.PHONY: clean
clean:
	rm -f *.gch *.o $(PROGRAM_NAME) pruebas
